package com.meixiang.entity.coupon;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 优惠券实体类
 * Created by xyj on 2016/5/23.
 */
public class CouponEntity implements Parcelable {

    private String classId; //类型Id   0、立减 1、满减
    private String couponId; // 优惠券Id
    private String couponIsused; //优惠券状态  0、可使用 1、已使用 2、过期
    private String className; //类型名称
    private String couponPrice; // 优惠金额
    private String storeName; //店铺名称
    private String couponDesc; //优惠描述
    private String startTime; //起始时间
    private String endTime; //终止时间
    private String couponTitle;

    protected CouponEntity(Parcel in) {
        this.classId = in.readString();
        this.couponId = in.readString();
        this.couponIsused = in.readString();
        this.className = in.readString();
        this.couponPrice = in.readString();
        this.storeName = in.readString();
        this.couponDesc = in.readString();
        this.startTime = in.readString();
        this.endTime = in.readString();
        this.couponTitle = in.readString();
    }

    public CouponEntity() {
    }

    public CouponEntity(String classId, String couponId, String couponIsused, String className, String couponPrice, String storeName, String couponDesc, String startTime, String endTime) {
        this.classId = classId;
        this.couponId = couponId;
        this.couponIsused = couponIsused;
        this.className = className;
        this.couponPrice = couponPrice;
        this.storeName = storeName;
        this.couponDesc = couponDesc;
        this.startTime = startTime;
        this.endTime = endTime;

    }

    public static final Parcelable.Creator<CouponEntity> CREATOR = new Parcelable.Creator<CouponEntity>() {
        @Override
        public CouponEntity createFromParcel(Parcel in) {
            return new CouponEntity(in);
        }

        @Override
        public CouponEntity[] newArray(int size) {
            return new CouponEntity[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.classId);
        dest.writeString(this.couponId);
        dest.writeString(this.couponIsused);
        dest.writeString(this.className);
        dest.writeString(this.couponPrice);
        dest.writeString(this.storeName);
        dest.writeString(this.couponDesc);
        dest.writeString(this.startTime);
        dest.writeString(this.endTime);
        dest.writeString(this.couponTitle);
    }

    public String getCouponTitle() {
        return couponTitle == null ? "" : couponTitle;
    }

    public void setCouponTitle(String couponTitle) {
        this.couponTitle = couponTitle;
    }

    public String getClassId() {
        return classId == null ? "" : classId;
    }

    public String getEndTime() {
        return endTime == null ? "" : endTime;
    }

    public String getStartTime() {
        return startTime == null ? "" : startTime;
    }

    public String getCouponDesc() {
        return couponDesc == null ? "" : couponDesc;
    }

    public String getStoreName() {
        return storeName == null ? "" : storeName;
    }

    public String getCouponPrice() {
        return couponPrice == null ? "" : couponPrice;
    }

    public String getClassName() {
        return className == null ? "" : className;
    }

    public String getCouponIsused() {
        return couponIsused == null ? "" : couponIsused;
    }

    public String getCouponId() {
        return couponId == null ? "" : couponId;
    }

    public void setClassId(String classId) {
        this.classId = classId;
    }

    public void setCouponId(String couponId) {
        this.couponId = couponId;
    }

    public void setCouponIsused(String couponIsused) {
        this.couponIsused = couponIsused;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public void setCouponPrice(String couponPrice) {
        this.couponPrice = couponPrice;
    }

    public void setStoreName(String storeName) {
        this.storeName = storeName;
    }

    public void setCouponDesc(String couponDesc) {
        this.couponDesc = couponDesc;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

}
